﻿package com.teaphy.coroutinecrawler.top_suspend

import kotlinx.coroutines.*

fun main() = runBlocking {
    println("coroutineContext - runBlocking: $coroutineContext")
    println("currentCoroutineContext - runBlocking: ${currentCoroutineContext()}")

    launch(CoroutineName("launch1")) {
        println("coroutineContext - launch1: $coroutineContext")
        println("currentCoroutineContext - launch1: ${currentCoroutineContext()}")

        delay(1000)

        launch(CoroutineName("launch2")) {
            delay(1000)
            println("coroutineContext - launch2: $coroutineContext")
            println("currentCoroutineContext - launch2: ${currentCoroutineContext()}")
        }
    }

    println("")
}

